Use the timestamp of the last user interaction when focusing the window.
authorMatthias Clasen <mclasen@redhat.com>
Mon, 21 Feb 2005 03:38:31 +0000 (03:38 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 21 Feb 2005 03:38:31 +0000 (03:38 +0000)
2005-02-20  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkwindow.c (gtk_window_present): Use the timestamp of
the last user interaction when focusing the window.  (#166379,
Elijah Newren)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkwindow.c

index 2da3a8cf093368a41a8b2c22a4eca2553d4f9080..a827090667b06bd5a23a34b31149b9c181f9f6ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-02-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_present): Use the timestamp of
+       the last user interaction when focusing the window.  (#166379, 
+       Elijah Newren)
+
 Thu Feb 17 14:58:16 2005  Manish Singh  <yosh@gimp.org>
 
        * gtk/gtkuimanager.c (start_element_handler): make sure expand
index 2da3a8cf093368a41a8b2c22a4eca2553d4f9080..a827090667b06bd5a23a34b31149b9c181f9f6ba 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_present): Use the timestamp of
+       the last user interaction when focusing the window.  (#166379, 
+       Elijah Newren)
+
 Thu Feb 17 14:58:16 2005  Manish Singh  <yosh@gimp.org>
 
        * gtk/gtkuimanager.c (start_element_handler): make sure expand
index 2da3a8cf093368a41a8b2c22a4eca2553d4f9080..a827090667b06bd5a23a34b31149b9c181f9f6ba 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_present): Use the timestamp of
+       the last user interaction when focusing the window.  (#166379, 
+       Elijah Newren)
+
 Thu Feb 17 14:58:16 2005  Manish Singh  <yosh@gimp.org>
 
        * gtk/gtkuimanager.c (start_element_handler): make sure expand
index 20b024369c991ba4e2e6acc24356661576b5a008..ad5d6f05e4a3715a276c0dfb8e793d13be9da0d2 100644 (file)
 #include "gtkmarshalers.h"
 #include "gtkplug.h"
 
+#ifdef GDK_WINDOWING_X11
+#include "x11/gdkx.h"
+#endif
+
 enum {
   SET_FOCUS,
   FRAME_EVENT,
@@ -5932,8 +5936,13 @@ gtk_window_present (GtkWindow *window)
       /* note that gdk_window_focus() will also move the window to
        * the current desktop, for WM spec compliant window managers.
        */
+#ifdef GDK_WINDOWING_X11
+      gdk_window_focus (widget->window,
+                       gdk_x11_display_get_user_time (gtk_widget_get_display (widget)));
+#else
       gdk_window_focus (widget->window,
                         gtk_get_current_event_time ());
+#endif
     }
   else
     {